import { createRouter, createWebHistory } from 'vue-router'

import 主页 from '@/views/主页.vue'
import 关于 from '@/views/关于.vue'
import 按钮 from '@/views/按钮.vue'
import 边框 from '@/views/边框.vue'
import 容器 from '@/views/容器.vue'
import 图标 from '@/views/图标.vue'
import 布局 from '@/views/布局.vue'
import 链接 from '@/views/链接.vue'
import 文本 from '@/views/文本.vue'
import 滑块 from '@/views/滑块.vue'
import 间隔 from '@/views/间隔.vue'
import 分隔 from '@/views/分隔.vue'


const 路由映射 = [
  {path: '/', component: 主页},
  {path: '/about', component: 关于},
  {path: '/container', component: 容器},
  {path: '/layout', component: 布局},
  {path: '/button', component: 按钮},
  {path: '/border', component: 边框},
  {path: '/icon', component: 图标}, 
  {path: '/link', component: 链接},
  {path: '/text', component: 文本},
  {path: '/scrollbar', component: 滑块},
  {path: '/space', component: 间隔},
  {path: '/splitter', component: 分隔},
]

const router = createRouter({
  history: createWebHistory(import.meta.env.BASE_URL),
  routes: 路由映射,
})

export default router
